//
//  NWDIscoverTableViewCell.m
//  World
//
//  Created by lanou on 15/10/26.
//  Copyright © 2015年 小虫. All rights reserved.
//

#import "NWDIscoverTableViewCell.h"
#import <UIImageView+WebCache.h>
@implementation NWDIscoverTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _pictureView = [[UIImageView alloc]initWithFrame:CGRectMake(5, 10, SCREEN_WIDTH - 10, 10 * SCREEN_HEIGHT / 36)];
        [self.contentView addSubview:_pictureView];
        
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(5, 10 * SCREEN_HEIGHT / 36 + 20, SCREEN_WIDTH - 10, 30)];
        _titleLabel.font = [UIFont fontWithName:@"Georgia-Bolditalic" size:15];
        [self.contentView addSubview:_titleLabel];
        
        _introduceLabel = [[UILabel alloc]initWithFrame:CGRectMake(5, 10 * SCREEN_HEIGHT / 36 + 60, SCREEN_WIDTH - 10, 40)];
        _introduceLabel.font = [UIFont fontWithName:@"MarkerFelt-Thin" size:15];
        _introduceLabel.numberOfLines = 0;
        [self.contentView addSubview:_introduceLabel];
    }
    return self;
}

- (void)setModle:(NWItemsModle *)modle
{
    [_pictureView sd_setImageWithURL:[NSURL URLWithString:modle.guide_image.url]];
    _titleLabel.text = modle.title;
    _introduceLabel.text = modle.introduction;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
